<?php
class Theme_model extends Model {
	function Theme_model()
	{
		parent::Model();
	}
	
	function load_theme($id)
	{
		$query = $this->db->query('select * from themes where id = ? limit 1', array($id));
		if ($query->num_rows() == 1)
			return $query->first_row();
	}
	
	function load_all()
	{
		$query = $this->db->query('select * from themes order by id asc');
		return $query->num_rows() > 0 ? $query : false;
	}
}
?>